<template>
  <el-row :gutter="20" class="container">
    <el-col :span="5" class="container">
      <el-row>
        <el-col><div class="grid-content bg-purple-light"><span>组织信息</span></div></el-col>
        <el-col>
          <el-tree :data="data" :props="defaultProps"></el-tree>
        </el-col>
      </el-row>
    </el-col>
    <el-col :span="15" class="container boderStyle">
      <el-col>
        <el-form :inline="true" :model="formInline" class="demo-form-inline">
          <el-form-item>
            <el-input v-model="formInline.user" placeholder="审批人"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary">查询</el-button>
            <el-button type="primary">添加</el-button>
          </el-form-item>
        </el-form>
      </el-col>
      <el-col>
        <el-table
          :data="tableData"
          border
          style="width: 100%">
          <el-table-column
            prop="date"
            label="日期"
            width="180">
          </el-table-column>
          <el-table-column
            prop="name"
            label="姓名"
            width="180">
          </el-table-column>
          <el-table-column
            prop="address"
            label="地址">
          </el-table-column>
        </el-table>
      </el-col>
    </el-col>
  </el-row>
</template>
<script>
  export default {
    data(){
      return {
        formInline: {
          user: '',
          region: ''
        },
        tableData: [{
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1517 弄'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1519 弄'
        }, {
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1516 弄'
        }],
        data: [{
          label: '一级 1',
          children: [{
            label: '二级 1-1',
            children: [{
              label: '三级 1-1-1'
            }]
          }]
        }, {
          label: '一级 2',
          children: [{
            label: '二级 2-1',
            children: [{
              label: '三级 2-1-1'
            }]
          }, {
            label: '二级 2-2',
            children: [{
              label: '三级 2-2-1'
            }]
          }]
        }, {
          label: '一级 3',
          children: [{
            label: '二级 3-1',
            children: [{
              label: '三级 3-1-1'
            }]
          }, {
            label: '二级 3-2',
            children: [{
              label: '三级 3-2-1'
            }]
          }]
        }],
        defaultProps: {
          children: 'children',
          label: 'label'
        }
      }
    }
  }
</script>
<style>
.toolContainer {
 height: 80px;
  border: 1px solid #e5e9f2;
  border-radius:8px;
}
  .container{
    height: 100%;
  }
  .boderStyle{
    border: 1px solid #dfe6ec;
  }
  .buttons{
    float: right;
  }
  .el-tree{
    height: 100%;
  }
  .bg-purple-light {
    background: #e5e9f2;
  }
.grid-content {
  min-height: 36px;
  padding-top: 10px;
}
  .demo-form-inline{
    margin-top: 20px;
  }
</style>
